<style>
    .percent {
        position: absolute;
        top: 8px;
        right: -5px;
    }
</style>
<!-- 设置定时器模态框（Modal） -->
<div class="modal fade" id="adModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×
                </button>
                <h4 class="modal-title" id="myModalLabel">
                    设置AD采样
                </h4>
            </div>
            <form role="form" action="/site/set-ad?deviceId=<?= $_GET['deviceId'] ?>" method="post"
                  id="adForm" class="form-horizontal">
                <div class="modal-body">
                    <div class="form-group">
                        <label for="lastname" class="col-sm-4 control-label">标定传感器上限值</label>
                        <div class="col-sm-3" style="position: relative">
                            <input type="number" class="form-control" placeholder="" name="upper"
                                   value="<?= $deviceInfo['trafficData']['traffic1Upper'] ?>">
                            <span class="percent">%</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="lastname" class="col-sm-4 control-label">标定传感器下限值</label>
                        <div class="col-sm-3" style="position: relative">
                            <input type="number" class="form-control" placeholder="" name="lower"
                                   value="<?= $deviceInfo['trafficData']['traffic1Lower'] ?>">
                            <span class="percent">%</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="lastname" class="col-sm-4 control-label">设定检测油位百分比</label>
                        <div class="col-sm-3" style="position: relative">
                            <input type="number" class="form-control" placeholder="" name="rate"
                                   value="<?= $deviceInfo['trafficData']['traffic1Rate'] ?>">
                            <span class="percent">%</span>
                        </div>
                    </div>
                    <p class="text-danger  error-msg" style="display: none"></p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        关闭
                    </button>
                    <button type="button" class="btn btn-primary submit-modal">
                        提交更改
                    </button>
                </div>
            </form>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->

